package com.member.controller;

import java.util.ArrayList;
import java.util.List;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class MemberController {
	
	@Value("${server.port}")
	private String serverPort;

	@RequestMapping("/getAllMember")
	public List<String> getAllMember(){
		 List<String> memberList= new ArrayList<>();
		 memberList.add("zhangsan");
		 memberList.add("lisi");
		 memberList.add("laowang");
		 memberList.add("serverPort:"+serverPort);
		 return memberList;
	}
	
	@RequestMapping("/getMemberServiceApi")
	public String getMemberServiceApi() {
		return "get Member Service success";
	}
}
